package com.abc.consumer.controller;

import com.abc.entity.UserCapital;
import com.abc.service.UserCapitalService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWordController {

    @Reference
    private UserCapitalService userCapitalService;


    //@RequestMapping("/hello")
    //public String hello() {
    //    //systemComponent.getUser();
    //    return "this is a test";
    //}

    @RequestMapping("hello")
    @ResponseBody
    public UserCapital getByUid(String uid) {
        UserCapital userCapital = userCapitalService.getByUid("000000000000000000000019830080");
        return userCapital;
    }
}
